package com.weixinli.dao.impl;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import com.weixinli.beans.DetailInfo;
import com.weixinli.dao.IDetailInfoDao;

@Repository("iDetailInfoDao")
public class DetailInfoDaoImpl implements IDetailInfoDao {
	@Resource(name="sqlSession")
	private SqlSession sqlSession;
	
	public void setSqlSession(SqlSession sqlSession) {
		this.sqlSession = sqlSession;
	}

	public int addDetailInfo(DetailInfo detailInfo) {
		return sqlSession.insert("detailInfo.addDetailInfo",detailInfo);
	}

	public int modDetailInfo(DetailInfo di) {
		return sqlSession.update("detailInfo.updateDetailInfo", di);
	}

	public int delDetailInfo(Integer did) {
		return 0;
	}

	public DetailInfo getOneDeInfo(Integer w_uid) {
		return sqlSession.selectOne("detailInfo.findUser", w_uid);
	}
}
